package com.luych.toolbox.docker.service.dao;

import com.luych.toolbox.docker.service.entity.DockerRegistry;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.Optional;

public interface DockerRegistryDao extends JpaRepository<DockerRegistry, String>, JpaSpecificationExecutor<DockerRegistry> {

    Optional<DockerRegistry> findByName(String name);

    Page<DockerRegistry> findByNameLikeOrUrlLike(String name, String url, Pageable pageable);

}